﻿using Dyao.Book.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Dyao.Book.Repository
{
    public class BookCatalogueEntityTypeConfiguration : IEntityTypeConfiguration<BookCatalogueEntity>
    {
        public void Configure(EntityTypeBuilder<BookCatalogueEntity> builder)
        {
            builder.Property(a => a.IsFree).HasBoolToStringConversion();
            builder.Property(a => a.CrawlComplete).HasBoolToStringConversion();
            builder.Property(a => a.IsMatchSource).HasBoolToStringConversion();
        }
    }
}
